package ae.pcfc.etks.online.common.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.dozer.Mapping;

/**
 * ClientPersonReq entity. @author Mohtisham.Salahria
 */
@Entity
@Table(name = "T_ETKS_CLIENT_PERSON_REQ", schema = "ETKS_ONLINE_DBA")
@SequenceGenerator(name = "SQ_ETKS_C_PERSON_REQ", sequenceName = "SQ_ETKS_C_PERSON_REQ", initialValue = 1, allocationSize = 1)
public class ClientPersonReq implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -6848210619471531117L;	
	
	private Long cpClientid;
	
	private Long cpRoleId;
	
	@Mapping("strNameTitle")
	private BigDecimal cpNametitle;
	
	@Mapping("strNonClientPersonNameENG")
	private String cpNamEng;
	
	@Mapping("strNonClientPersonNameARB")
	private String cpNameArb;
	
	@Mapping("iGender")
	private Integer cpGender;
	
	@Mapping("strDateOfBirth")
	private Date cpDob;
	
	@Mapping("strNationality")
	private String cpNationality;
	
	@Mapping("strPOBox")
	private String cpPobox;
	
	@Mapping("strPOBoxLocation")
	private String cpPoboxLocation;
	
	@Mapping("strTelNoOffice")
	private String cpOffTel;
	
	@Mapping("strTelNoHome")
	private String cpHomeTel;
	
	@Mapping("strMobNo1")
	private String cpMobile1;
	
	@Mapping("strMobNo2")
	private String cpMobile2;
	
	@Mapping("strFaxNo")
	private String cpFax;
	
	@Mapping("strEmailAddress")
	private String cpEmail;
	
	@Mapping("strWebsiteURL")
	private String cpWebsite;
	
	@Mapping("strAddressENG")
	private String cpAddressEng;
	
	@Mapping("strAddressARB")
	private String cpAddressArb;
	
	@Mapping("strCity")
	private String cpCity;
	
	@Mapping("strCountry")
	private String cpCountry;
	
	@Mapping("strPassportNo")
	private String cpPpno;
	
	@Mapping("strPassportPlaceOfIssue")
	private String cpPpPoi;
	
	@Mapping("strPassportDateOfIssue")
	private Date cpPpDoi;
	
	@Mapping("strPassportExpiryDate")
	private Date cpPpDoe;
	
	@Mapping("strEmiratesID")
	private String cpEmiratesId;
	
	@Mapping("strEbdara")
	private String cpEbdara;
	
	@Mapping("strVisaNo")
	private String cpVisano;
	
	@Mapping("strVisaType")
	private String cpVType;
	
	@Mapping("strVisaExpiryDate")
	private Date cpVExpiry;
	
	@Mapping("strRemarks")
	private String cpRemarks;
	
	private String applicationId;
	
	@Mapping("strLeaseCopyURL")
	private String strLeaseCopyURL;
	
	@Mapping("strContractCopyURL")
	private String strOwnerContractCopyURL;
	
	
	private String cpCreatedUser;
	
	private String cpCategory;
	
	private Set<ClientPersonRoleReq> ClientPersonRoleReqs = new HashSet<ClientPersonRoleReq>(
			0);
	// Constructors

	/** default constructor */
	public ClientPersonReq() {
	}

	/** full constructor */
	public ClientPersonReq(BigDecimal cpNametitle, String cpNamEng,
			String cpNameArb, Long cpRoleId, Integer cpGender, Date cpDob,
			String cpNationality, String cpPobox, String cpPoboxLocation,
			String cpOffTel, String cpHomeTel, String cpMobile1,
			String cpMobile2, String cpFax, String cpEmail, String cpWebsite,
			String cpAddressEng, String cpAddressArb, String cpCity,
			String cpCountry, String cpPpno, String cpPpPoi, Date cpPpDoi,
			Date cpPpDoe, String cpEmiratesId, String cpEbdara,
			String cpVisano, String cpVType, Date cpVExpiry, String cpRemarks,
			String applicationId, String cpRefNo) {
		this.cpNametitle = cpNametitle;
		this.cpNamEng = cpNamEng;
		this.cpNameArb = cpNameArb;
		this.cpRoleId = cpRoleId;
		this.cpGender = cpGender;
		this.cpDob = cpDob;
		this.cpNationality = cpNationality;
		this.cpPobox = cpPobox;
		this.cpPoboxLocation = cpPoboxLocation;
		this.cpOffTel = cpOffTel;
		this.cpHomeTel = cpHomeTel;
		this.cpMobile1 = cpMobile1;
		this.cpMobile2 = cpMobile2;
		this.cpFax = cpFax;
		this.cpEmail = cpEmail;
		this.cpWebsite = cpWebsite;
		this.cpAddressEng = cpAddressEng;
		this.cpAddressArb = cpAddressArb;
		this.cpCity = cpCity;
		this.cpCountry = cpCountry;
		this.cpPpno = cpPpno;
		this.cpPpPoi = cpPpPoi;
		this.cpPpDoi = cpPpDoi;
		this.cpPpDoe = cpPpDoe;
		this.cpEmiratesId = cpEmiratesId;
		this.cpEbdara = cpEbdara;
		this.cpVisano = cpVisano;
		this.cpVType = cpVType;
		this.cpVExpiry = cpVExpiry;
		this.cpRemarks = cpRemarks;
		this.applicationId = applicationId;
				
	}

	// Property accessors
	@Id
	@GeneratedValue( strategy = GenerationType.SEQUENCE, generator="SQ_ETKS_C_PERSON_REQ")
	@Column(name = "CP_REQID", nullable = false, precision = 11, scale = 0)
	public Long getCpClientid() {
		return this.cpClientid;
	}

	public void setCpClientid(Long cpClientid) {
		this.cpClientid = cpClientid;
	}

	@Column(name = "CP_NAMETITLE", precision = 22, scale = 0)
	public BigDecimal getCpNametitle() {
		return this.cpNametitle;
	}

	public void setCpNametitle(BigDecimal cpNametitle) {
		this.cpNametitle = cpNametitle;
	}

	@Column(name = "CP_NAM_ENG", length = 50)
	public String getCpNamEng() {
		return this.cpNamEng;
	}

	public void setCpNamEng(String cpNamEng) {
		this.cpNamEng = cpNamEng;
	}

	@Column(name = "CP_NAME_ARB", length = 50)
	public String getCpNameArb() {
		return this.cpNameArb;
	}

	public void setCpNameArb(String cpNameArb) {
		this.cpNameArb = cpNameArb;
	}

	@Column(name = "CP_ROLE_ID", precision = 11, scale = 0)
	public Long getCpRoleId() {
		return this.cpRoleId;
	}

	public void setCpRoleId(Long cpRoleId) {
		this.cpRoleId = cpRoleId;
	}

	@Column(name = "CP_GENDER", length = 1)
	public Integer getCpGender() {
		return this.cpGender;
	}

	public void setCpGender(Integer cpGender) {
		this.cpGender = cpGender;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CP_DOB", length = 7)
	public Date getCpDob() {
		return this.cpDob;
	}

	public void setCpDob(Date cpDob) {
		this.cpDob = cpDob;
	}

	@Column(name = "CP_NATIONALITY", length = 20)
	public String getCpNationality() {
		return this.cpNationality;
	}

	public void setCpNationality(String cpNationality) {
		this.cpNationality = cpNationality;
	}

	@Column(name = "CP_POBOX", length = 10)
	public String getCpPobox() {
		return this.cpPobox;
	}

	public void setCpPobox(String cpPobox) {
		this.cpPobox = cpPobox;
	}

	@Column(name = "CP_POBOX_LOCATION", length = 10)
	public String getCpPoboxLocation() {
		return this.cpPoboxLocation;
	}

	public void setCpPoboxLocation(String cpPoboxLocation) {
		this.cpPoboxLocation = cpPoboxLocation;
	}

	@Column(name = "CP_OFF_TEL", length = 20)
	public String getCpOffTel() {
		return this.cpOffTel;
	}

	public void setCpOffTel(String cpOffTel) {
		this.cpOffTel = cpOffTel;
	}

	@Column(name = "CP_HOME_TEL", length = 20)
	public String getCpHomeTel() {
		return this.cpHomeTel;
	}

	public void setCpHomeTel(String cpHomeTel) {
		this.cpHomeTel = cpHomeTel;
	}

	@Column(name = "CP_MOBILE1", length = 20)
	public String getCpMobile1() {
		return this.cpMobile1;
	}

	public void setCpMobile1(String cpMobile1) {
		this.cpMobile1 = cpMobile1;
	}

	@Column(name = "CP_MOBILE2", length = 20)
	public String getCpMobile2() {
		return this.cpMobile2;
	}

	public void setCpMobile2(String cpMobile2) {
		this.cpMobile2 = cpMobile2;
	}

	@Column(name = "CP_FAX", length = 20)
	public String getCpFax() {
		return this.cpFax;
	}

	public void setCpFax(String cpFax) {
		this.cpFax = cpFax;
	}

	@Column(name = "CP_EMAIL", length = 50)
	public String getCpEmail() {
		return this.cpEmail;
	}

	public void setCpEmail(String cpEmail) {
		this.cpEmail = cpEmail;
	}

	@Column(name = "CP_WEBSITE", length = 50)
	public String getCpWebsite() {
		return this.cpWebsite;
	}

	public void setCpWebsite(String cpWebsite) {
		this.cpWebsite = cpWebsite;
	}

	@Column(name = "CP_ADDRESS_ENG", length = 100)
	public String getCpAddressEng() {
		return this.cpAddressEng;
	}

	public void setCpAddressEng(String cpAddressEng) {
		this.cpAddressEng = cpAddressEng;
	}

	@Column(name = "CP_ADDRESS_ARB", length = 200)
	public String getCpAddressArb() {
		return this.cpAddressArb;
	}

	public void setCpAddressArb(String cpAddressArb) {
		this.cpAddressArb = cpAddressArb;
	}

	@Column(name = "CP_CITY", length = 30)
	public String getCpCity() {
		return this.cpCity;
	}

	public void setCpCity(String cpCity) {
		this.cpCity = cpCity;
	}

	@Column(name = "CP_COUNTRY", length = 30)
	public String getCpCountry() {
		return this.cpCountry;
	}

	public void setCpCountry(String cpCountry) {
		this.cpCountry = cpCountry;
	}

	@Column(name = "CP_PPNO", length = 20)
	public String getCpPpno() {
		return this.cpPpno;
	}

	public void setCpPpno(String cpPpno) {
		this.cpPpno = cpPpno;
	}

	@Column(name = "CP_PP_POI", length = 30)
	public String getCpPpPoi() {
		return this.cpPpPoi;
	}

	public void setCpPpPoi(String cpPpPoi) {
		this.cpPpPoi = cpPpPoi;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CP_PP_DOI", length = 7)
	public Date getCpPpDoi() {
		return this.cpPpDoi;
	}

	public void setCpPpDoi(Date cpPpDoi) {
		this.cpPpDoi = cpPpDoi;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CP_PP_DOE", length = 7)
	public Date getCpPpDoe() {
		return this.cpPpDoe;
	}

	public void setCpPpDoe(Date cpPpDoe) {
		this.cpPpDoe = cpPpDoe;
	}

	@Column(name = "CP_EMIRATES_ID", length = 50)
	public String getCpEmiratesId() {
		return this.cpEmiratesId;
	}

	public void setCpEmiratesId(String cpEmiratesId) {
		this.cpEmiratesId = cpEmiratesId;
	}

	@Column(name = "CP_EBDARA", length = 20)
	public String getCpEbdara() {
		return this.cpEbdara;
	}

	public void setCpEbdara(String cpEbdara) {
		this.cpEbdara = cpEbdara;
	}

	@Column(name = "CP_VISANO", length = 20)
	public String getCpVisano() {
		return this.cpVisano;
	}

	public void setCpVisano(String cpVisano) {
		this.cpVisano = cpVisano;
	}

	@Column(name = "CP_V_TYPE", length = 20)
	public String getCpVType() {
		return this.cpVType;
	}

	public void setCpVType(String cpVType) {
		this.cpVType = cpVType;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CP_V_EXPIRY", length = 7)
	public Date getCpVExpiry() {
		return this.cpVExpiry;
	}

	public void setCpVExpiry(Date cpVExpiry) {
		this.cpVExpiry = cpVExpiry;
	}

	@Column(name = "CP_REMARKS", length = 300)
	public String getCpRemarks() {
		return this.cpRemarks;
	}

	public void setCpRemarks(String cpRemarks) {
		this.cpRemarks = cpRemarks;
	}

	@Column(name = "APPLICATION_ID", length = 2000)
	public String getApplicationId() {
		return this.applicationId;
	}

	public void setApplicationId(String applicationId) {
		this.applicationId = applicationId;
	}
	
	/**
	 * @return the strLeaseCopyURL
	 */
	@Column(name = "CP_LEASE_COPY", length = 50)
	public String getStrLeaseCopyURL() {
		return strLeaseCopyURL;
	}

	/**
	 * @param strLeaseCopyURL the strLeaseCopyURL to set
	 */
	public void setStrLeaseCopyURL(String strLeaseCopyURL) {
		this.strLeaseCopyURL = strLeaseCopyURL;
	}

	/**
	 * @return the strOwnerContractCopyURL
	 */
	@Column(name = "CP_OWNER_CON_COPY", length = 50)
	public String getStrOwnerContractCopyURL() {
		return strOwnerContractCopyURL;
	}

	/**
	 * @param strOwnerContractCopyURL the strOwnerContractCopyURL to set
	 */
	public void setStrOwnerContractCopyURL(String strOwnerContractCopyURL) {
		this.strOwnerContractCopyURL = strOwnerContractCopyURL;
	}

	/**
	 * @return the cpCategory
	 */
	@Column(name = "CP_CATEGORY", length = 50)
	public String getCpCategory() {
		return cpCategory;
	}

	/**
	 * @param cpCategory the cpCategory to set
	 */
	public void setCpCategory(String cpCategory) {
		this.cpCategory = cpCategory;
	}
	
	/**
	 * @return the cpCreatedUser
	 */
	@Column(name = "CP_CREATEDUSER", length = 50)
	public String getCpCreatedUser() {
		return cpCreatedUser;
	}

	/**
	 * @param cpCreatedUser the cpCreatedUser to set
	 */
	public void setCpCreatedUser(String cpCreatedUser) {
		this.cpCreatedUser = cpCreatedUser;
	}
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "clientPersonReq")
	public Set<ClientPersonRoleReq> getClientPersonRoleReqs() {
		return this.ClientPersonRoleReqs;
	}

	public void setClientPersonRoleReqs(
			Set<ClientPersonRoleReq> ClientPersonRoleReqs) {
		this.ClientPersonRoleReqs = ClientPersonRoleReqs;
	}
}